﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed

#pragma once

#include "IGeometry.h"
#include "WeakReferenceable.h"

namespace gcmp
{
    class IPoint3d;
    class IEdge;

    /// \brief 拓扑点
    /// 加载几何库时实现开启拓扑点生成，默认BrepBody没有拓扑点
    /// 如果gbmp_gcmp_behavior_config默认配置的EnableVertexGeneration不为0，开启拓扑点生成
    class IVertex : public IGeometry, public WeakReferenceable
    {
    public:

        /// \brief   获取拓扑点对应的几何点
        /// \return  几何点
        virtual OwnerPtr<IPoint3d> GetPoint() const = 0;

        /// \brief  获取该点邻接的所有边
        /// \param[out] edges  拓扑边数组
        /// \return  获取成功返回true，失败返回false
        virtual bool GetEdges(std::vector<const IEdge*>& edges) const = 0;

    public:
        virtual ~IVertex() {}
    };
}
